package com.erp.utils;

import java.util.Properties;

/**
 * @ClassName AccountUtils
 * @Description 生成授权帐号
 * @Author songjizhen
 * @Date 2020-06-23 13:59
 * @Version 1.0
 */
public class AccountUtils {
    public static void createAuthorizeAccount(String account) throws Exception {
        Properties authorize = PropertiesUtils.loadProperties("authorize");
        //公钥
        String publicString =authorize.getProperty("public");
        //获取分隔符
        String split =authorize.getProperty("split");
        //授权用户
       // String account="test";
        //加密后帐号密文
        String encrypt = RSAEncrypt.encrypt(account, publicString);
        System.out.println(encrypt+split);

    }

    public static void main(String[] args) throws Exception {
        AccountUtils.createAuthorizeAccount("test");
    }
}
